Modern computing systems manage access to shared resources (e.g., memory, disk storage, file systems, files, logical units of storage, etc.) on behalf of users and various internal and external functions. However, not all resources are easily shared. For instance, if two processes attempt to modify the same file simultaneously, the contents of the file may become corrupted. Such concurrency problems can be addressed by allowing the computing system to execute only one process at any given time. However, doing so would result in underutilizing the processing capacity of the system, resulting in poor performance.
Conventional solutions to this problem allow the computing system to execute multiple independent processes (“threads”) while preventing more than one process from modifying any one resource at any given time by using resource locks. In response to a resource access request made by a first thread, the system can “lock” a resource such that only that thread can modify or otherwise access the resource at any given time. Other threads which do not require access to that locked resource can proceed uninterrupted.